package com.snailthink.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: springmvc-study
 * @description:
 * @author: SnailThink
 * @create: 2021-03-11 20:36
 **/
public class ControllerTest implements Controller {

	public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
		//返回一个模型视图对象
		ModelAndView mv = new ModelAndView();
		mv.addObject("msg","ControllerTest");
		mv.setViewName("test");
		return mv;
	}
}
